package com.hzcx.app.simplechat.ui.setting.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.base.BaseEmptyBean;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.PublicModel;
import com.hzcx.app.simplechat.model.SettingModel;
import com.hzcx.app.simplechat.ui.publicui.bean.ProtocolBean;
import com.hzcx.app.simplechat.ui.setting.contract.AboutContract;
import com.hzcx.app.simplechat.ui.setting.contract.AccountContract;

public class AccountPresenter extends BasePresenter<AccountContract.View> implements AccountContract.Presenter {

    /**
     * 绑定或解绑微信
     *
     * @param context
     * @param code
     */
    @Override
    public void bindWechat(Context context, String code) {
        SettingModel.bindWechat(context, code, new BaseDialogObserver<BaseEmptyBean>(context) {
            @Override
            protected void onSuccess(BaseEmptyBean data) {
                mView.bindSuccess();
            }
        });
    }
}
